package pkg

import (
	"encoding/json"
	"fmt"
	"github.com/Baidu-AIP/golang-sdk/aip/censor"
)

type T struct {
	ConclusionType string
}

func Baidu(req string) string {
	client := censor.NewClient("ih9cdkB3rILzOQxu1RIXHGgB", "izxOMOac82wjsNdSL618XrgOKqZ1tW6J")

	client.TextCensor(req)
	fmt.Println(req)

	var t T

	json.Unmarshal([]byte(req), &t)

	return t.ConclusionType

}
